import fetch from './fetch'

export default {
    GetOrderId,
    GetQrCode,
    GetPay,
    CreateOrder,
    SubmitOrder,
    GetWallet,
    CollectionPro,
    IsCollectionPro,
    CancelCollectionPro
}
//获取order ID
function GetOrderId(options){
    return fetch({
        method:'post',
        path:'/web-api/pay/wallet-recharge/create',
        params:options
    });
}
function GetQrCode(options){
    return fetch({
        method:'post',
        path:'/web-api/pay/order/submit',
        params:options
    });
}
//查询订单状态
function GetPay(options){
    return fetch({
        method:'get',
        path:'/web-api/pay/order/get',
        params:options
    });
}
//支付
function CreateOrder(options){
    return fetch({
        method:'post',
        path:'/web-api/trade/order/create',
        params:options
    });
}
//支付确认
function SubmitOrder(options){
    return fetch({
        method:'post',
        path:'/web-api/pay/order/submit',
        params:options
    });
}
//获取钱包
function GetWallet(options){
    return fetch({
        method:'get',
        path:'/web-api/pay/wallet/get',
        params:options
    });
}
//收藏商品
function CollectionPro(options){
    return fetch({
        method:'post',
        path:'/web-api/business/product/favorite/create',
        params:options
    });
}
//是否收藏过该商品
function IsCollectionPro(options){
    return fetch({
        method:'get',
        path:'/web-api/business/product/favorite/exits',
        params:options
    });
}
//取消收藏
function CancelCollectionPro(options){
    return fetch({
        method:'post',
        path:'/web-api/business/product/favorite/delete',
        params:options,
    });
}